/**
 * 收藏夹服务
 */

import request from '@/utils/request';

/**
 * 收藏
 * @param resourceId
 * @param resourceType 资源类型,0=项目;1=公文;2=会议;3=档案;4=法律法规
 * @returns {Promise<*>}
 */
export async function save(resourceId, resourceType) {
  return request({
    url: `collect/save`,
    method: 'POST',
    params: {
      resourceId,
      resourceType
    }
  })
}
/**
 * 取消收藏
 * @param resourceId
 * @param resourceType 资源类型,0=项目;1=公文;2=会议;3=档案;4=法律法规
 * @returns {Promise<*>}
 */
export async function del(resourceId, resourceType) {
  return request({
    url: `collect/delete`,
    method: 'POST',
    params: {
      resourceId,
      resourceType
    }
  })
}